<?php
namespace Home\Model;
use Think\Model;
/**
 * Created by PhpStorm.
 * User: 97628
 * Date: 2016/6/19
 * Time: 12:37
 */
class oneModel extends Model{
    /**
     * 得到随机一条数据
     * @return mixed
     */
    function getRandom(){
        do {
            $page = mt_rand(14, 1377);
            $condition['page'] = $page;
            $res = M('one')->where($condition)->select();
        }while(sizeof($res) == 0);
        return $res[0];
    }

}